﻿// Decompiled with JetBrains decompiler
// Type: TaleWorlds.CampaignSystem.Settlements.Fief
// Assembly: TaleWorlds.CampaignSystem, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E85F8C15-4DF6-4E9C-A58A-29177E40D07A
// Assembly location: D:\steam\steamapps\common\Mount & Blade II Bannerlord\bin\Win64_Shipping_Client\TaleWorlds.CampaignSystem.dll

using System.Collections.Generic;
using TaleWorlds.CampaignSystem.Party;
using TaleWorlds.CampaignSystem.Party.PartyComponents;
using TaleWorlds.Library;
using TaleWorlds.SaveSystem;

#nullable disable
namespace TaleWorlds.CampaignSystem.Settlements
{
  public abstract class Fief : SettlementComponent
  {
    [CachedData]
    public GarrisonPartyComponent GarrisonPartyComponent;

    protected override void AutoGeneratedInstanceCollectObjects(List<object> collectedObjects)
    {
      base.AutoGeneratedInstanceCollectObjects(collectedObjects);
    }

    internal static object AutoGeneratedGetMemberValueFoodStocks(object o)
    {
      return (object) ((Fief) o).FoodStocks;
    }

    [SaveableProperty(100)]
    public float FoodStocks { get; set; }

    public float Militia => this.Owner.Settlement.Militia;

    public MobileParty GarrisonParty => this.GarrisonPartyComponent?.MobileParty;
  }
}
